package com.aop;

import com.aop.service.UserService;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AopTest2 {
    @Test
    public void test(){
        ApplicationContext context = new ClassPathXmlApplicationContext("beanss.xml");
        UserService userService = (UserService) context.getBean("userService");
        userService.add();
    }
}
